package cn.iocoder.an.module.business.controller.admin.auditplandetail.vo;

import cn.iocoder.an.module.business.controller.admin.auditarea.vo.AuditAreaPageReqVO;
import cn.iocoder.an.module.business.controller.admin.auditplanarea.vo.AuditPlanAreaRespVO;
import cn.iocoder.an.module.business.dal.dataobject.auditlevel.AuditLevelDO;
import cn.iocoder.an.module.business.dal.dataobject.audittype.AuditTypeDO;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;
import cn.iocoder.an.framework.excel.core.annotations.DictFormat;
import cn.iocoder.an.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 审核填报 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AuditPlanDetailRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7903")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "分类", example = "15684")
    @ExcelProperty("分类")
    @Trans(type = TransType.SIMPLE, target = AuditTypeDO.class,   fields = {"name"},refs = {"auditTypeName"})
    private Long auditTypeId;

    @Schema(description = "分类名称", example = "王五")
    @ExcelProperty("分类名称")
    private String auditTypeName;


    @Schema(description = "审核项", example = "18600")
    @ExcelProperty("审核项")
    private Long configId;

    @Schema(description = "审核项", example = "芋艿")
    @ExcelProperty("审核项")
    private String configName;

    @Schema(description = "审核结果")
    @ExcelProperty(value = "审核结果", converter = DictConvert.class)
    @DictFormat("audit_result") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String auditResult;

    @Schema(description = "问题简述", example = "你猜")
    @ExcelProperty("问题简述")
    private String remark;

    @Schema(description = "责任人", example = "17834")
    @ExcelProperty("责任人")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.system.dal.dataobject.user.AdminUserDO", fields = "nickname", ref = "dutyUserName")
    private Long dutyUserId;

    private String dutyUserName;

    @Schema(description = "计划完成时间")
    @ExcelProperty("计划完成时间")
    private LocalDate planDate;

    @Schema(description = "附件")
    @ExcelProperty("附件")
    private List<String> files;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    //对应的上级 计划区域ID
    private Long planAreaId;

    private String areaName;

    //问题图片
    private List<String> problemImg;

    //扣分
    private double deductPoints;

    //整改部门
    private Long repairDeptId;

    //整改部门
    private String repairDeptName;

    //整改措施
    private String takeWay;

    //整改图片
    private List<String> repairImg;

    //完成状态
    private Integer completeStatus;

    //问题备注
    private String problemRemark;

    //审核人
    private List<Long> auditUserId;

    //审核人
    private String auditUserName;

    //审核状态
    private Integer auditStatus;

    //审核备注
    private String auditRemark;

    //审核时间
    private LocalDateTime auditTime;

    private AuditPlanAreaRespVO planAreaRespVO;


}